import React from 'react';
import {
  WeiboOutlined,
  ZhihuOutlined,
  TwitterOutlined,
  YoutubeOutlined,
  RedditOutlined,
  GlobalOutlined,
} from '@ant-design/icons';
import { Platform } from '../types/hotRadar';

interface PlatformConfig {
  name: string;
  color: string;
  icon: React.ReactNode;
  description: string;
}

export const platformConfig: Record<Platform, PlatformConfig> = {
  [Platform.WEIBO]: {
    name: '微博',
    color: 'red',
    icon: <WeiboOutlined />,
    description: '微博热搜榜',
  },
  [Platform.ZHIHU]: {
    name: '知乎',
    color: 'blue',
    icon: <ZhihuOutlined />,
    description: '知乎热榜',
  },
  [Platform.TOUTIAO]: {
    name: '头条',
    color: 'volcano',
    icon: <GlobalOutlined />,
    description: '今日头条热点',
  },
  [Platform.BAIDU]: {
    name: '百度',
    color: 'geekblue',
    icon: <GlobalOutlined />,
    description: '百度热搜',
  },
  [Platform.XIAOHONGSHU]: {
    name: '小红书',
    color: 'magenta',
    icon: <GlobalOutlined />,
    description: '小红书热门',
  },
  [Platform.DOUYIN]: {
    name: '抖音',
    color: 'purple',
    icon: <GlobalOutlined />,
    description: '抖音热点',
  },
  [Platform.TWITTER]: {
    name: 'Twitter',
    color: 'cyan',
    icon: <TwitterOutlined />,
    description: 'Twitter趋势',
  },
  [Platform.REDDIT]: {
    name: 'Reddit',
    color: 'orange',
    icon: <RedditOutlined />,
    description: 'Reddit热门',
  },
  [Platform.YOUTUBE]: {
    name: 'YouTube',
    color: 'red',
    icon: <YoutubeOutlined />,
    description: 'YouTube热门',
  },
};

export const platformOptions = Object.entries(platformConfig).map(([value, config]) => ({
  label: config.name,
  value,
  description: config.description,
}));